﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using System.Collections.ObjectModel;
using BawangMemo.BackendModels;

namespace BawangMemo.BawangMemoView.View
{
    /// <summary>
    /// WrongWordDia.xaml 的交互逻辑
    /// </summary>
    public partial class WrongWordDia : Window
    {
        public int showtag = 0;
        public List<WordWrapper> _ww;
        public WrongWordDia()
        {
            InitializeComponent();
        }

        public WrongWordDia(List<WordWrapper> ww, ObservableCollection<TestWordInfo> w)
        {
            _wordsWrong = w; _ww = ww;
            InitializeComponent();
            listView1.ItemsSource = wordsWrong;
        }

        public ObservableCollection<TestWordInfo> wordsWrong
        {
            get { return _wordsWrong; }
        }
        public ObservableCollection<TestWordInfo> _wordsWrong;

        private void button1_Click(object sender, RoutedEventArgs e)
        {
            showtag = 1;
            for (int i = 0; i < _ww.Count; i++)
                TagRepository.AddTag(_ww[i], "生词本");
            
            this.Close();
        }
    }
}
